<!DOCTYPE html>
<html lang="zh">
<head>
    <!--    <base href="${base}/">-->
    <meta charset="UTF-8"/>
    <title>组件状态一览</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
    <link rel="stylesheet" href="amis/sdk.css"/>
    <!-- 从 1.1.0 开始 sdk.css 将不支持 IE 11，如果要支持 IE11 请引用这个 css，并把前面那个删了 -->
    <!-- <link rel="stylesheet" href="amis/sdk-ie11.css" /> -->
    <!-- 不过 amis 开发团队几乎没测试过 IE 11 下的效果，所以可能有细节功能用不了，如果发现请报 issue -->

    <!-- 百度云舍主题 -->
    <link href="amis/cxd.css" rel="stylesheet"/>
    <!-- 暗黑主题 -->
    <!-- <link href="amis/dark.css" rel="stylesheet" /> -->
    <!-- 仿 antd 主题 -->
    <!-- <link href="amis/antd.css" rel="stylesheet" /> -->

    <style>
        html, body, .app-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

    </style>
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="amis/sdk.js"></script>
<script type="text/javascript">
    (function () {
        let amis = amisRequire('amis/embed');
        // 通过替换下面这个配置来生成不同页面
        let amisJSON = {
            "type": "page",
            "title":"组件状态一览",
            "body": [
                {
                    "type": "crud",
                    "autoGenerateFilter": true,
                    "api": "/monitor/list",
                    "perPageField":"size",
                    "defaultParams":{
                        "size":99999
                    },
                    "columns":[
                        {
                            "name":"id",
                            "label":"ID"
                        },
                        {
                            "name":"group_set",
                            "label":"分组"
                        },
                        {
                            "name":"project",
                            "label":"项目"
                        },
                        {
                            "name":"compent",
                            "label":"组件"
                        },
                        {
                            "name":"status",
                            "label":"状态",
                            "type":"status"
                        },
                        {
                            "name":"last_active",
                            "label":"最后活跃"
                        },
                        {
                            "name":"ip",
                            "label":"IP"
                        }
                        ,
                        {
                            "name":"note",
                            "label":"备注"
                        }
                        ,
                        {
                            "name":"extra",
                            "label":"额外数据"
                        }
                    ]
                }
            ]
        };
        let amisScoped = amis.embed('#root', amisJSON);
    })();

</script>
</body>
</html>